<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- 引入 Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="/ulms_project/js/jquery-3.3.1.min.js"></script>
<title>安排维修组长</title>
<style>
/*header的样式*/
.header{
	height:50dp;
	background:#ddd;
	
}
/*容器的样式*/
.container
{
	background:#fff;
	margin-top:30dp;
	height:500px;
}
/*footer的样式*/
div#footer {
    clear: both;
    padding-top: 16px;
    width: 100%;
    line-height: 24px;
    font-family: PingFangSC-Regular, 微软雅黑, Verdana, Arial, 宋体;

    background-color:f9f9f9;
	bottom:20px;
}
</style>
</head>

<body>
<div class="header">
<h1>某高校后勤管理</h1>
</div>
<div class="container">
	<div>
                <div class="form-group">
    				<label for="name">原因说明：</label>
    				<input class="form-control" id="name"/>
           	  </div>
              	<input type="button" class="btn btn-primary btn-lg btn-block" value="确定" onClick="check()"/>
        </div>


</div>
<div id="footer">
<p id="p1">
某高校后勤管理用于学习
</p>

<p id="p2">
使用条款和隐私条款。版权所有，保留一切权利。
赞助商：<a href="">某公司</a>。

</p>
</div>
</body>
<script>
//加载页面
var id ="";
$().ready(function()
{
	//获取维修id
	var str=window.location.search;   //location.search是从当前URL的?号开始的字符串
	var id_list = str.split("=");
	 id = id_list[1];
	$.post("/ulms_project/repair/admin_repairsingle_detail",{order_id:id},function(data)
	{
	     console.log(data);
		var repairDto = data.repairDto;
		   var user = repairDto.user;
		   var repair_order =repairDto.repair_order;
	    var str ="<div class=\"item\">"
                +" <div ><span>报修人："+user.name+" </span><span style=\"margin-left:40px\">报修时间："+repair_order.created+"</span><span style=\"margin-left:40px\">报修地址："+repairDto.school_name+repairDto.area_name+repairDto.dorm_name+"</span></div>"
                + "</div>";	
        $(".container").append(str);      			
	});
	
});

//获取维修组长并设置到select中去
function check()
{
	//获取需要提交的信息
	var order_id=id;
	var remarks = $("#name").val();
	$.post("/ulms_project/repair/repair_auditing_disagree",{remarks:remarks,order_id:order_id},function(data)
	{
	        var is_success = data.is_success;
	        if(is_success ==true)
	        {
	        alert("原因已填写");
	        }
			
	});

}
</script>

</html>
